import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      title: '登录',
      name: 'login',
      component: resolve => require(['../components/login'], resolve),
    }, {
      path: '/home',
      title: '首页',
      component: resolve => require(['../components/layout'], resolve),
      children: [
        {
          path: '/home_index',
          title: '首页',
          component: resolve => require(['../components/tradingsystem/home_1'], resolve),
          children: [
            {
              path: '',
              title: '交易记录',
              name: 'tradingsystem_1',
              component: resolve => require(['../components/tradingsystem/tradingsystem'], resolve),
            },
            {
              path: '/decision',
              title: '决策信息',
              name: 'decision_1',
              component: resolve => require(['../components/tradingsystem/decision'], resolve),
            },
            {
              path: '/hedginginfo',
              title: '交易对信息',
              name: 'hedginginfo_1',
              component: resolve => require(['../components/tradingsystem/hedginginfo'], resolve),
            }
          ]
        },
        {
          path: '/apiset_index',
          title: 'api配置',
          component: resolve => require(['../components/APISetting/home'], resolve),
          children: [
            {
              name: 'APIsetting',
              path: '/APIsetting/:id',
              title: 'api配置详情',
              component: resolve => require(['../components/APISetting/setting'], resolve),
            }
          ]
        },
        {
          path: '/riskmanagement',
          title: '风控设置',
          name:'riskmanagement',
          component: resolve => require(['../components/Riskmanagement/riskmanagent'], resolve),
        }
      ]
    },
  ]
})
